using Unity.Entities;
using UnityEngine;

public class ConfigAuthoring : MonoBehaviour
{
    public GameObject GridGameObject;
    public GameObject BlockGameObject;
    public GameObject UnitGameObject;
}

class ConfigBaker : Baker<ConfigAuthoring>
{
    public override void Bake(ConfigAuthoring authoring)
    {
        this.AddComponent(new Config
        {
            GridEntity = this.GetEntity(authoring.GridGameObject),
            BlockEntity = this.GetEntity(authoring.BlockGameObject),
            UnitEntity = this.GetEntity(authoring.UnitGameObject)
        });
    }
}
